﻿using Basic.FormRemoteModel.QueryGroup;
using Basic.FormRemoteModel.QueryGroup.Model;
using Basic.FormService.Interface;
using WeDonekRpc.Client.Interface;

namespace Basic.FormService.RpcEvent
{
    internal class PhyQueryGroupEvent : IRpcApiService
    {
        private readonly IPhyQueryGroupService _Service;

        public PhyQueryGroupEvent ( IPhyQueryGroupService service )
        {
            this._Service = service;
        }

        public long AddPhyQueryGroup ( AddPhyQueryGroup obj )
        {
            return this._Service.Add(obj.Datum);
        }

        public void DeletePhyQueryGroup ( DeletePhyQueryGroup obj )
        {
            this._Service.Delete(obj.Id);
        }

        public QueryGroupDto GetPhyQueryGroup ( GetPhyQueryGroup obj )
        {
            return this._Service.Get(obj.Id);
        }

        public bool SetPhyQueryGroup ( SetPhyQueryGroup set )
        {
            return this._Service.Set(set.Id, set.Datum);
        }
    }
}
